package com.yj.rocketmq.producer.imp.producer;


import com.yj.rocketmq.producer.AbstractMqTransProducer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * apacheRocketMq 发送消息
 *
 * @author Xie
 * @date 19-3-19
 */
@Slf4j
@Component("rocketMqTransProducerImpl")
public class RocketMqTransProducerImpl extends AbstractMqTransProducer {

    @Value("${spring.application.name:}")
    private String producerId;

    @Value("${cloud.rocketMq.namesrv:null}")
    private String nameSrv;

    @Value("${cloud.rocketMq.maxReproducerTimes:3}")
    private String maxReproducerTimes;

    @Value("${cloud.producerEnable:false}")
    private Boolean producerEnable;


    @Override
    protected String getProducerId() {
        return this.producerId;
    }

    @Override
    protected String getNameSrv() {
        return this.nameSrv;
    }

    @Override
    protected String getMaxReproducerTimes() {
        return this.maxReproducerTimes;
    }

    @Override
    protected Boolean getProducerEnable() {
        return this.producerEnable;
    }
}